@import "css/variables";

.comic {
    font-family: $font-title-comic;
    letter-spacing: 2px;
    font-weight: 300;
    text-shadow: 2px 1px rgba(0,0,0,0.9);
}

h1, h2, h3, h4, h5 {
    .heading-anchor {
        position: absolute;
        left: 0;
        padding-right: 1em;
        margin-left: -1em;
        opacity: 0;
        font-size: .8em;
        padding-top: 5px;
        padding-left: 5px;
        color: lighten($color-primary, 20);
        text-decoration: none;
        font-weight: 200;
    }

    .heading-anchor:hover,
    &:hover > .heading-anchor {
        opacity: 100;
    }

    @media(max-width: $width-container) {
        .heading-anchor {
            position: relative;
            display: none;
            left: 0;
            padding-top: 0;
            margin-left: 0;
            padding-right: 0;
            padding-left: 0;
        }
    }
}

div.center {
    @include wrapper();
    text-align: center;
}

em.center {
    display: block;
    text-align: center;
}

.center {
    text-align: center;
}

em.small {
    font-size: 1rem;
}

img + em.small {
    margin-top: -1rem;
}

pre + p > em.small {
    margin-top: -1.5em;
}

div.center > p {
    padding-right: 0;
}

.sneaky-placeholder {
    display: none;
    margin-bottom: 3rem;
    margin-top: 3rem;
    font-size: 1em;
}

.sneaky-placeholder > h2 {
    margin-top: 0;
    font-size: 1.4em;
}

.sneaky-placeholder > p {
    margin-bottom: 0;
}

.sneaky-placeholder.shown {
    display: block;
}

.avatar {
    display: inline-block;
    height: 2em;
    border-radius: 50%;
    margin-top: 0;
    margin-bottom: 0;
}

.cta:visited,
.cta {
    display: inline-block;
    cursor: pointer;
    background-color: $color-primary;
    margin: .5rem 0;
    text-align: center;
    padding: 1em 2em;
    color: #fff;
    text-decoration: none;
    font-family: $font-title;
    font-weight: 600;
    transition: all 100ms ease-out;
    border: 3px solid $color-primary;


    @media (max-width: $width-container-mobile) {
        font-size: 1.2em;
        line-height: 1.4em;
    }
}

.cta:hover {
    background-color: $color-primary-pastel;
    color: $color-primary;
}

.cta-small {
    padding: .3em 1em;
    font-size: 1.2rem;
}

.cta-bold {
    font-weight: bold;
}

.cta-light {
    background-color: #fff;
    color: lighten(#000, 40);
    padding: 1em 2em;

    &:hover {
        color: #000;
    }
}

.cta-ghost {
    background-color: #fff;
    border: none;
    color: lighten(#000, 40);
    padding: 1em 2em;

    &:hover {
        color: $color-primary;
        background-color: #fff;
    }
}

.cta-light:hover {
    background-color: #fff;
}

.caps {
    font-variant: all-small-caps;
}

.title {
    font-family: $font-title;
    text-decoration: none;
    position: relative;

    &:hover {
        color: $color-primary;
    }

    font-kerning: normal;
    font-size: 2.5em;
    line-height: 1.2em;
    letter-spacing: 2px;
    font-weight: 300;
}

.adsbygoogle {
    max-width: $width-base;
    padding: 2rem 0;
    margin-left: auto;
    margin-right: auto;
}

.no-ad .ad-container,
.no-ad .sneaky-placeholder {
    display: none;
}

.image-noborder img,
.image-noborder + p > a > img,
.image-noborder + p > img {
    box-shadow: none;
}

.image-noborder + p + p > em {
    margin-top: -3rem;
}

.mobile-only {
    display: none;

    @media(max-width: 630px) {
        display: block;
    }
}

.desktop-only {
    display: none;

    @media(min-width: 631px) {
        display: block;
    }
}

.no-break {
    white-space: nowrap;
}

.patreon {
    font-family: $font-title;
    font-size: .9rem;
    padding: .6em 0;
    background-color: $color-primary-pastel;

    p {
        font-size: 1em;
        color: #000;
        margin-bottom: 0;

        a {
            color: #000;
            text-decoration: underline;

            &:hover{
                text-decoration: none;
            }
        }
    }

    &.patreon-light {
        background: none;
    }
}

.ad-container:not(.ad-google) {
    margin-bottom: 1em;

    @media (min-width: $width-container) {
        height: 140px;
        overflow: hidden;
    }
}

.ad-google {
    margin-bottom: 100px;
}

#carbonads {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    cursor: pointer;
    font-size: 18px;
    line-height: 1.4em;
    position: relative;


    a {
        text-decoration: none;
    }
}

#carbonads > span {
    display: flex;
    flex-wrap: wrap;

    & > a {
        display: block;
        width: 100%;
        text-align: right;
        margin-top: -1.7em;
        padding-right: .1em;

        @media (max-width: $width-container-mobile) {
            padding-right: 1em;
        }
    }
}

.carbon-wrap {
    display: flex;
    align-items: center;
    font-size: 1.1em;

    img {
        width: 130px;
        height: 100px;
        margin: 0;
    }

    a:last-child {
        padding-left: 1em;
    }

    @media (max-width: $width-container-mobile) {
        padding: 1em;
        background-color: darken(#fff, 2);
        flex-direction: column;
        align-items: flex-start;

        a:last-child {
            margin-top: 1em;
            padding-left: 0;
            margin-bottom: 1em;
        }
    }
}

.wrapper {
    @include wrapper();
}

h1 > .subtitle {
    display: block;
    font-size: .5em;
    padding-left: 1rem;
}
